//
//  LifeCollectionViewCell.m
//  B-72K
//
//  Created by sos on 16/3/16.
//  Copyright © 2016年 sos. All rights reserved.
//

#import "LifeCollectionViewCell.h"

@implementation LifeCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.lineLabel = [[UILabel alloc]init];
        self.lineLabel.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:self.lineLabel];
        
        self.lineLabelOne = [[UILabel alloc]init];
        self.lineLabelOne.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:self.lineLabelOne];
        
        
        self.img = [[UIImageView alloc]init];
        
        [self.contentView addSubview:self.img];
        
        self.labelOne = [[UILabel alloc]init];
        
        [self.contentView addSubview:self.labelOne];
        
        self.labelTwo = [[UILabel alloc]init];
        
        [self.contentView addSubview:self.labelTwo];
    }
    return self;
}

-(void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    self.lineLabel.frame = CGRectMake(0, 1, layoutAttributes.frame.size.width, 1);
    self.lineLabelOne.frame = CGRectMake(layoutAttributes.frame.size.width+1, 1, 2, layoutAttributes.frame.size.height);
    
    self.img.frame = CGRectMake(10*W, 15*H, 70*W, 70*H);
    self.labelOne.frame = CGRectMake(85*W, 20*H, 90*W, 30*H);
    self.labelOne.font = [UIFont systemFontOfSize:12];
    self.labelOne.textAlignment = NSTextAlignmentCenter;
    self.labelOne.textColor = [UIColor whiteColor];
    
    self.labelTwo.frame = CGRectMake(85*W, 50*H, 90*W, 30*H);
    self.labelTwo.font = [UIFont systemFontOfSize:12];
    self.labelTwo.textAlignment = NSTextAlignmentCenter;
    self.labelTwo.textColor = [UIColor whiteColor];
    
    
    
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
